import axios from 'axios';
import qs from 'qs';

let http = {
    get : "",
    post : ""
};

http.get = function (url, params, callBack) {
    return new Promise((resolve, reject) => {
        axios.get(url, qs.stringify(params)).then((res)=>{
            if(callBack){
                callBack(res.data);
            }
        })
    });
}

export default http